﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Maticsoft.Web.Admin.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>管理登录</title>
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/login.css" rel="stylesheet" type="text/css" />
    <script src="js/include/jquery/jquery.js" language="javascript" type="text/javascript"></script>
    <script type="text/javascript">
        function refresh() {
            document.getElementById("authImg").src = 'ValidateCode.aspx?now=' + new Date();
        }
        function Chk() {
            String.prototype.Trim = function () {
                return this.replace(/(^\s*)|(\s*$)/g, "");
            }
            String.prototype.LTrim = function () {
                return this.replace(/(^\s*)/g, "");
            }
            String.prototype.RTrim = function () {
                return this.replace(/(\s*$)/g, "");
            }
            var UserName = document.getElementById("UserName");
            var Password = document.getElementById("Password");
            var Vcode = document.getElementById("Vcode");
            if (UserName.value.Trim() == "") {
                UserName.focus();
                alert("请输入用户名");
                return false;
            }
            if (Password.value.Trim() == "") {
                Password.focus();
                alert("请输入密码");
                return false;
            }
            if (Vcode.value.Trim() == "") {
                Vcode.focus();
                alert("请输入验证码");
                return false;
            }
            return true;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="login-box">
        <div class="login-top">
            <a href="../Default.aspx" target="_blank" title="返回网站主页">返回网站主页</a></div>
        <div class="login-main">
            <input type="hidden" name="gotopage" value="" />
            <input type="hidden" name="dopost" value="login" />
            <input name='adminstyle' type='hidden' value='newdedecms' />
            <dl>
                <dt>用户名：</dt>
                <dd>
                    <asp:TextBox ID="UserName" runat="server"></asp:TextBox></dd>
                <dt>密&nbsp;&nbsp;码：</dt>
                <dd>
                    <asp:TextBox ID="Password" TextMode="Password" class="alltxt" runat="server"></asp:TextBox></dd>
                <dt>验证码：</dt>
                <dd>
                    <asp:TextBox ID="Vcode" Width="50" runat="server"></asp:TextBox> <img
                        id="authImg" align="absmiddle" onclick="refresh()" style="cursor: pointer;"
                        alt="看不清？点击更换" src="ValidateCode.aspx" />
                    <a href="javascript:void(0);" onclick="refresh()">看不清？ </a>
                </dd>
                <dt>&nbsp;</dt>
                <dd>
                    <asp:Button ID="Button1" runat="server" Text="登录" class="login-btn" 
                        onclick="Button1_Click" OnClientClick="return Chk();" /></dd>
            </dl>
        </div>
        <div class="login-power">
            Powered by<a href="javascript:void(0);"><strong>静水流深</strong></a></div>
    </div>
    </form>
</body>
</html>
